USE AdventureWorks2008

--Create a stored procedure

CREATE Procedure pGetEmployeeLogin
	@NationalIDNumber nvarchar(15)
AS
	SELECT NationalIDNumber,
			LoginID
	FROM HumanResources.Employee 
	WHERE NationalIDNumber = @NationalIDNumber 
GO

--Execute a stored procedure

Exec pGetEmployeeLogin @NationalIDNumber='295847284'

